package com.du.managerback.service;

import com.du.managerback.entity.Employee;
import com.du.managerback.mapper.EmployeeMapper;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

//服务 是 controller（给前端的接口）与 mapper（操作数据库）之间的桥梁
@Service
public class EmployeeService {

    //接口通过Resource 创建
    @Resource
    //关联到Mapper 对接
            EmployeeMapper employeeMapper;

    //List列表
    public List<Employee> getAll() {
        return employeeMapper.selectAll();
    }

    public void setAll() {
    }
}